package demo3;

import java.sql.SQLOutput;
import java.util.List;

/**
 * @description:
 * @author:Mr.Cat
 * @create:2021-11-04 18:19
 **/
public class DAOTest {
    public static void main(String[] args) {
        DAO<User> dao = new DAO<>();
        dao.save("1001",new User(1001,34,"周杰伦"));
        dao.save("1002",new User(1002,20,"林俊杰"));
        dao.save("1003",new User(1003,30,"薛之谦"));

        dao.update("1003",new User(1003,56,"成龙"));

        dao.delete("1002");

        List<User> list = dao.list();
        list.forEach(System.out::println);

    }

}

